<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="btn" onclick="fn()">关闭</button> 
<script>
    // window.open("","","height=400,width=400,left=100,top=100")
    //打开新窗口
    function fn(){ 
        window.close(); 关闭当前浏览器窗口
    }
 
    function fn2(){
        window.createPopup()
    }
    fn2();
</script>
</body>
</html>